Lukhanyiso Bvuma
2025-10-01
Date Created: October 01, 2025
This presentation showcases the power of Plotly for creating interactive, web-based visualizations in R.
What makes Plotly special?
We’ll explore the classic mtcars dataset with
interactive plots.
| mpg | cyl | disp | hp | drat | wt | qsec | vs | am | gear | carb | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Mazda RX4 | 21.0 | 6 | 160 | 110 | 3.90 | 2.620 | 16.46 | 0 | 1 | 4 | 4 |
| Mazda RX4 Wag | 21.0 | 6 | 160 | 110 | 3.90 | 2.875 | 17.02 | 0 | 1 | 4 | 4 |
| Datsun 710 | 22.8 | 4 | 108 | 93 | 3.85 | 2.320 | 18.61 | 1 | 1 | 4 | 1 |
| Hornet 4 Drive | 21.4 | 6 | 258 | 110 | 3.08 | 3.215 | 19.44 | 1 | 0 | 3 | 1 |
| Hornet Sportabout | 18.7 | 8 | 360 | 175 | 3.15 | 3.440 | 17.02 | 0 | 0 | 3 | 2 |
Variables: - mpg: Miles per gallon -
hp: Horsepower
- wt: Weight (1000 lbs) - cyl: Number of
cylinders
Try hovering over the points! Notice the relationship between weight and fuel efficiency.
Try rotating the plot! Click and drag to explore different angles.
Insight: Fewer cylinders generally mean better fuel efficiency.
Strong negative correlations (blue) between weight/cylinders and fuel efficiency.
Click play! Watch how cars are distributed across the power spectrum.
What we learned:
Why use Plotly?
Learn More:
Try it yourself:
# Basic example
library(plotly)
plot_ly(data = iris,
x = ~Sepal.Length,
y = ~Petal.Length,
color = ~Species)Publishing options: - GitHub Pages (free hosting) - RPubs (easy one-click publishing) - NeoCities (simple hosting)
Presentation created on: October 01, 2025
Tools used: - R Markdown - Plotly for R - Slidy presentation format
All plots are interactive - hover, click, zoom, and explore!
Questions or feedback?
[Your Email] | [Your GitHub]